<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html dir="ltr" xmlns="http://www.w3.org/1999/xhtml">
<%@include file="/WEB-INF/taglibs/common/taglibs.jsp"%>
<head>
<title><spring:message code="admin.viewquestion.title" /></title>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<link rel="stylesheet" href="<c:url value="/css/styles.css"/>" />
<script src="<c:url value="/javascripts/common.js"/>"></script>

</head>

<body>
<%@include file="../top_menu.jsp"%>
<table width="100%">
	<tr>
		<td><c:import url="/WEB-INF/jsp/admin/faq/faq_menu.jsp" />
		</td>
	</tr>
</table>

<div class="contentArea">
<table border=0 cellpadding=0 cellspacing=0 width=70% align="center">
	<tr>
		<td valign="top"></td>
		<td valign="top">
		<table border="0" cellpadding="5" cellspacing="5" width="100%" align="center">

			<tr>
				<td colspan="2">
				
					<table width=70% class="formTable" cellpadding="5" cellspacing="5">
						<tr>
							<td colspan="2" align="center"><h3><spring:message code="admin.viewquestion.label.questiondetails" /></h3></td>
						</tr>
						<tr><td colspan="2"><hr /></td></tr>										 
						<tr>
							<td><spring:message code="admin.viewquestion.label.questionid" /></td>
							<td>${question.id}</td>
						</tr>
						<tr>
							<td><spring:message code="admin.viewquestion.label.email" /></td>
							<td>${question.email}</td>
						</tr>
						<tr>
							<td><spring:message code="admin.viewquestion.label.firstname" /></td>
							<td>${question.firstName}</td>
						</tr>						
						<tr>
							<td><spring:message code="admin.viewquestion.label.lastname" /></td>
							<td>${question.lastName}</td>
						</tr>
						<tr>
							<td><b><spring:message code="admin.viewquestion.label.question" /></b></td>
							<td>${question.question}</td>
						</tr>
						<tr>
							<td><spring:message code="admin.viewquestion.label.category" /></td>
							<td>${question.category.name}</td>
						</tr>
						<tr>
							<td><spring:message code="admin.viewquestion.label.ordernumber" /></td>
							<td>${question.orderNumber}</td>
						</tr>						
						<tr>
							<td><b><spring:message code="admin.viewquestion.label.confidential" /></b></td>
							<td>${question.confidentialLabel}</td>
						</tr>
						<tr>
							<td><spring:message code="admin.viewquestion.label.tagforquestion" /></td>
							<td>${question.tag}</td>
						</tr>
						<tr>
							<td><spring:message code="admin.viewquestion.label.rank" /></td>
							<td>${question.topRank}</td>
						</tr>						
						<tr>
							<td><spring:message code="admin.viewquestion.label.cretedat" /></td>
							<td>${question.createdDatetime}</td>
						</tr>						
						<tr><td colspan="2"><hr /></td></tr>	
							
						<c:if test="${answer != null}">
							<tr>
								<td><b><spring:message code="admin.viewquestion.label.answer" /></b></td>
								<td>${answer.answer}</td>
							</tr>
							<tr>
								<td><spring:message code="admin.viewquestion.label.tagforanswer" /></td>
								<td>${answer.tag}</td>
							</tr>													
							<tr>
								<td><b><spring:message code="admin.viewquestion.label.cretedat" /></b></td>
								<td>${answer.createdDatetime}</td>
							</tr>
							<tr>
								<td><b><spring:message code="admin.viewquestion.label.lastupdatedat" /></b></td>
								<td>${answer.updatedDatetime}</td>
							</tr>
						</c:if>							
						<c:if test="${answer == null}">
							<tr>
								<td colspan="2"><spring:message code="admin.viewquestion.label.questionnotanswered" /></td>
							</tr>						
						</c:if>	
						<tr>
							<td colspan="2">&nbsp;</td>
						</tr>

						<tr>
							<td colspan="2" align="center">
								<c:if test="${answer == null}">
									<input type="button" class='ui-button ui-state-default ui-corner-all' value="<spring:message code="admin.viewquestion.button.reply" />" onclick="javascript:window.location='reply_question.htm?id=${question.id}';" />
								</c:if>	
								<c:if test="${answer != null}">
									<input type="button" class='ui-button ui-state-default ui-corner-all' value="<spring:message code="admin.viewquestion.button.updateanswer" />" onclick="javascript:window.location='update_answer.htm?id=${question.id}';" />
								</c:if>							
								<input type="button" class='ui-button ui-state-default ui-corner-all' value="<spring:message code="admin.viewquestion.button.cancel" />" onclick="location.href='faq_question.htm'" /></td>
						</tr>
						

												
					</table>
				</td>
			</tr>
		</table>
		</td>
	</tr>

</table>
</div>

<%@include file="/WEB-INF/jsp/include/footer.jsp"%>
</body>
</html>